#include <stdint.h>

/* 
    SEQUENCE (2 bytes)
        OBJECT IDENTIFIER (2+5 bytes)   1.3.14.3.2.26 (sha1)
        OCTET STRING      (2+20 bytes)  <SHA1 CDHash>
    SEQUENCE (2 bytes)
        OBJECT IDENTIFIER (2+9 bytes)   2.16.840.1.101.3.4.2.1 (sha256)
        OCTET STRING      (2+32 bytes)  <SHA256 CDHash>
*/
uint8_t CDHashesDERTemplate[] = {
    /* SEQUENCE (2 bytes) */
    0x30, 0x1D,
        /* OBJECT IDENTIFIER (2+5 bytes) */
        0x06, 0x05, 0x2B, 0x0E, 0x03, 0x02, 0x1A,
        /* OCTET STRING (2+20 bytes) */
        0x04, 0x14,
        /* SHA1 CDHash goes here */
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    /* SEQUENCE (2 bytes) */
    0x30, 0x2D,
        /* OBJECT IDENTIFIER (2+9 bytes) */
        0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01,
        /* OCTET STRING (2+32 bytes) */
        0x04, 0x20,
        /* SHA256 CDHash goes here */
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

#define CDHASHES_DER_SIZE 78
#define CDHASHES_DER_SHA1_OFFSET 11
#define CDHASHES_DER_SHA256_OFFSET 46
